package com.zc.kaoshi.service.impl;

import com.zc.kaoshi.mapper.KaoshiMapper;
import com.zc.kaoshi.pojo.Kaoshi;
import com.zc.kaoshi.service.IKaoshiService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class KaoshiService implements IKaoshiService {
    @Resource
    KaoshiMapper kaoshiMapper;
    @Override
    public List<Kaoshi> getall() {
        List<Kaoshi> zidians = kaoshiMapper.getall();
        return zidians;
    }

    @Override
    public List<Kaoshi> search(String ziname, String zitype, String zistatu, String zitime1,String zitime2) {
        List<Kaoshi> search = kaoshiMapper.search(ziname, zitype, zistatu,zitime1,zitime2);
        return search;
    }

    @Override
    public Integer inserzidian(Kaoshi kaoshi) {
        int inserzidian = kaoshiMapper.inserzidian(kaoshi);
        return inserzidian;
    }

    @Override
    public Integer changezidian(Kaoshi kaoshi) {
        Integer changezidian = kaoshiMapper.changezidian(kaoshi);
        return changezidian;
    }

    @Override
    public Integer delzidian(Integer id) {
        Integer delzidian = kaoshiMapper.delzidian(id);
        return delzidian;
    }

    @Override
    public Integer delmany(List<Integer> ids) {

            Integer delmany = kaoshiMapper.delmany(ids);
            return delmany;


    }
}
